# Flutter Foundations Course - Documentation

This is the documentation website for the Flutter eCommerce app that we will build as part of my [Flutter Foundations Course](https://codewithandrea.com/courses/flutter-foundations/).

It contains FAQs and additional resources you may find useful.

## Articles & Reference Guides

I often publish in-depth articles that are a great complement to the course lessons.

Here's a complete list:

- [Articles & Reference guides](/resources/index)

## FAQ

This section contains answers to common issues regarding:

- Getting the **starter project** to run
- **Android emulator** and **gradle** issues
- **Cocoapods** and running on iOS/macOS

Head over to sidebar to read all the FAQs.

## Course Updates

Here's a list of all the course updates I've made so far:

- [October 2022 Update (Flutter 3.3, Riverpod 2.0, GoRouter 5.0)](/updates/2022-10)
- [November 2022 Update](/updates/2022-11)
- [February 2023 Update](/updates/2023-02)
- [May 2023 Update (Flutter 3.10, Dart 3.0, Riverpod 2.3, GoRouter 7.0)](/updates/2023-05)
- [August 2023 Update (Flutter 3.13, Dart 3.1, GoRouter 10.1)](/updates/2023-08)
- [November 2023 Update (Flutter 3.16, Dart 3.2, GoRouter 12.1)](/updates/2023-11)
- [May 2024 Update (Flutter 3.22, Dart 3.4)](/updates/2024-05)

## Flutter Web Demo

A Flutter web build of the completed app is available at this link:

- [Flutter eCommerce Demo App](https://ecommerce-app-scratch.web.app/)

This is intended as a **reference eCommerce app** for viewing and purchasing products, and includes the following features:

- Products List
- Product Page
- Product Reviews
- Shopping Cart
- Checkout using Stripe
- Orders List
- Sign in & sign out flows
- Admin pages (manage products and orders)

### Flutter Client

The demo includes a Flutter app that runs on iOS, Android and web.

The **primary** packages in use by the reference app are:

- [`flutter_riverpod`](https://pub.dev/packages/flutter_riverpod) and [`freezed`](https://pub.dev/packages/freezed) for state management
- [`go_router`](https://pub.dev/packages/go_router) for navigation and routing
- [`flutter_stripe`](https://pub.dev/packages/flutter_stripe), [`flutter_stripe_web`](https://pub.dev/packages/flutter_stripe_web) and [`pay`](https://pub.dev/packages/pay) for payments
- [`sembast`](https://pub.dev/packages/sembast) and [`sembast_web`](https://pub.dev/packages/sembast_web) for local data persistence
- [`firebase_auth`](https://pub.dev/packages/firebase_auth)
- [`cloud_firestore`](https://pub.dev/packages/cloud_firestore)
- [`cloud_functions`](https://pub.dev/packages/cloud_functions)
- [`flutter_layout_grid`](https://pub.dev/packages/flutter_layout_grid) for layouts based on CSS-grid
- [`cached_network_image`](cached_network_image) to show images from the Internet and keep them in the cache directory
- [`mocktail`](https://pub.dev/packages/mocktail) for testing

### Architecture

The client app uses the controller-service-repository pattern and defines four layers:

- **Data layer** using **repositories** to access to the outside world (Firebase) and expose data classes to the rest of the app via Futures and Streams
- **Domain layer** containing all the **models/entities** needed by the app, along with the business logic to manipulate them
- **Application layer** using **service** classes to mediate between the repositories and the levels below
- **Presentation layer** containing the **widgets** along with the **controllers** that manipulate their state and call APIs from the layers above

Learn more in the [articles & reference guides](/resources/index).

